import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({  
    state: {  
        login: false,  
        token: '',  
        avatarUrl: '',  
        userName: '',
		 id:'', 
    },  
    mutations: {  
        // login(state, provider) {  
        //     console.log(state)  
        //     console.log(provider)  
        //     state.login = true;  
        //     state.token = provider.token;  
        //     state.userName = provider.userName;  
        //     state.avatarUrl = provider.avatarUrl;  
        // },  
        // logout(state) {  
        //     state.login = false;  
        //     state.token = '';  
        //     state.userName = '';  
        //     state.avatarUrl = '';  
        // }, 
		     saveLocalid(state,id) {
		       this.state.id = id;
		     },
			 saveToken(state,token){
				 this.state.token = token
			 },
			 saveavatarUrl(state,avatarUrl){
				 this.state.avatarUrl = avatarUrl
			 }
    }  
})
export default store